/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import { Request, Response } from 'express';
import { responseSuccess } from './utils';
import Mock from 'mockjs';

const { mock } = Mock;
export default {
  'POST /FinanceAppRecharge/rechargeSumList': (req: Request, res: Response, u: string) => {
    const result = mock({
      code: 0,
      msg: '成功',
      data: {
        'account|2': [
          {
            id: '@id',
            'kb_id|1': ['@id', '0'],
            kb_type: 'yz',
            total_recharge_amount: '10.00',
            unbilled_amount: '5.00',
            billed_amount: '5.00',
            update_time: '2022-09-20 09:29:56',
            invoice_title: [
              '测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试',
            ],
            'app_name|1': ['快宝驿站', '快递员'],
          },
        ],
        'detail|6': [
          {
            kb_id: '@id()',
            'app_name|1': ['快宝驿站', '快递员'],
            date: '2022-07',
            remark_date: 202207,
            'amount|1-100': 100,
            'remark_status|1': ['0', '1'], //1存在备注，0没有备注
            'kb_type|1': ['yz', 's'],
          },
        ],
      },
    });
    return res.json(result);
  },
  'POST /FinanceAppRecharge/addBillInfo': (req: Request, res: Response) =>
    responseSuccess(req, res),
  'POST /FinanceAppRecharge/getRemarkList': (req: Request, res: Response, u: string) => {
    //kb_id/remark_date/kb_type
    const result = mock({
      code: 0,
      msg: '成功',
      'data|2': [
        {
          kb_id: '@id()',
          'kb_type|1': ['yz', 's'],
          'remark_date|1': ['202207', '202208'],
          remark: '@cname()',
          create_time: '@date()',
          operate_name: '@cname()',
          operate_mobile: '15649709989',
        },
      ],
    });
    return res.json(result);
  },
  'POST /FinanceAppRecharge/addRemark': (req: Request, res: Response) => responseSuccess(req, res),
};
